namespace APITransLib.Contracts;

public enum MessageKind
{
    Text,
    System,
    Agent
}

public class MessageDto
{
    public required string Id { get; init; }
    public required string FromUserId { get; init; }
    public required string? ToUserId { get; init; } // null when group message
    public required string? ToGroupId { get; init; } // null when direct message
    public required MessageKind Kind { get; init; }
    public required string Content { get; set; }
    public required DateTimeOffset SentAt { get; init; }
}

public class SendMessageRequest
{
    public required string? ToUserId { get; init; }
    public required string? ToGroupId { get; init; }
    public required MessageKind Kind { get; init; } = MessageKind.Text;
    public required string Content { get; init; }
}

public class SendMessageResponse
{
    public required MessageDto Message { get; init; }
}
